<template>
  <div class="home-contact">
    <div class="contact-container container">
      <div class="contact-left">
        <h3 class="title">Contacts Us</h3>
        <p class="paragraph">
          Let's make something new, different and more meaningful or make thing
          more visual or conceptual?
        </p>

        <div class="contact-way-list">
          <div class="contact-way-container">
            <img src="@/assets/img/home/phone-icon.png" alt="" />
            <div class="contact-way">
              <span class="way">Call Me</span>
              <div class="contact">+123 456 7890</div>
            </div>
          </div>
          <div class="contact-way-container">
            <img src="@/assets/img/home/Email-icon.png" alt="" />
            <div class="contact-way">
              <span class="way">Email</span>
              <div class="contact">example@Investment.com</div>
            </div>
          </div>
          <div class="contact-way-container">
            <img src="@/assets/img/home/Adress-icon.png" alt="" />
            <div class="contact-way">
              <span class="way">Adress</span>
              <div class="contact">
                Here is the investor address information investor address
                information
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="contact-right">
        <h3 class="drop-line">Drop a line</h3>
        <form action="mailto: codermzy@163.com" ref="formSubRef">
          <el-row :gutter="30">
            <el-col :span="12">
              <el-input placeholder="Name" v-model="contact.name"></el-input>
            </el-col>
            <el-col :span="12">
              <el-input placeholder="Email" v-model="contact.email"></el-input>
            </el-col>
          </el-row>
          <el-row :gutter="30">
            <el-col :span="12">
              <el-input placeholder="Phone" v-model="contact.phone"></el-input>
            </el-col>
            <el-col :span="12">
              <el-input placeholder="Topic" v-model="contact.topic"></el-input>
            </el-col>
          </el-row>
          <el-row :gutter="30">
            <el-col :span="24">
              <el-input
                v-model="contact.message"
                class="message"
                type="textarea"
                placeholder="Message"
              ></el-input>
            </el-col>
          </el-row>

          <el-row :gutter="30">
            <el-col :span="24" class="btn">
              <el-button @click="handleSubmitBtn()">
                <img src="@/assets/img/home/send-icon.png" alt="" />
                Send Message
              </el-button>
            </el-col>
          </el-row>
        </form>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { reactive, ref } from 'vue'

const contact = reactive({
  name: '',
  email: '',
  phone: '',
  topic: '',
  message: '',
})

const formSubRef = ref()

const handleSubmitBtn = () => {
  formSubRef.value.submit()
}
</script>

<style scoped lang="less">
.home-contact {
  width: 100%;
  box-sizing: border-box;
  padding-top: 91px;
  background-color: #1c1c24;
  color: #fff;

  .contact-container {
    display: flex;
    justify-content: space-between;
    .contact-left {
      width: 517px;
      .title {
        font-size: 55px;
        font-family: Source Han Serif SC;
        font-weight: 800;
        margin-bottom: 25px;
      }
      .paragraph {
        width: 490px;
        font-size: 18px;
        font-family: SF Pro Text;
        font-weight: 400;
        margin-bottom: 66px;
      }

      .contact-way-list {
        margin-left: 26px;
        .contact-way-container {
          display: flex;
          margin-bottom: 57px;
        }
        img {
          width: 50px;
          height: 50px;
        }
        .contact-way {
          margin-left: 28px;
          .way {
            font-size: 18px;
            font-family: SF Pro Display;
            font-weight: 400;
            color: #707070;
          }

          .contact {
            font-size: 24px;
            font-family: SF Pro Display;
            font-weight: 400;
          }
        }
      }
    }

    .contact-right {
      width: 826px;
      .drop-line {
        font-size: 55px;
        font-family: Source Han Serif SC;
        font-weight: 800;
        margin-bottom: 47px;
      }
      .message {
        :deep(.el-textarea__inner) {
          height: 241px;
          background-color: transparent;
          box-shadow: none;
          border: 2px solid #707070;
          color: #707070;
          font-size: 20px;
          padding-left: 26px !important;
          padding-top: 34px;
        }
      }
      .btn {
        display: flex;
        justify-content: center;
      }
    }
  }
}

:deep(.el-input__inner) {
  height: 92px;
  border: 2px solid #707070;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: none;
  background-color: transparent;
  padding-left: 26px !important;
  font-size: 20px;
  color: #707070;
}
:deep(.el-button) {
  margin-top: 47px;
  width: 242px;
  height: 57px;
  border: 1px solid #3772ff;
  border-radius: 41px;
  background-color: #1c1c24;
  margin-bottom: 35px;
  img {
    margin-right: 11px;
  }
}

@media screen and (max-width: 768px) {
  .home-contact {
    padding-top: 0;
    background-color: #0e0e12 !important;

    .contact-container {
      display: block;
      .contact-left {
        text-align: center;
        width: auto;
        .title {
          font-size: 30px;
          font-family: Source Han Serif SC;
          font-weight: 800;
          margin-bottom: 7px;
        }
        .paragraph {
          width: auto;
          font-size: 13px;
          font-family: SF Pro Text;
          font-weight: 400;
          color: #707070;
          margin-bottom: 27px;
        }

        .contact-way-list {
          display: none;
        }
      }

      .contact-right {
        width: 100%;
        margin: 0 auto;
        .drop-line {
          display: none;
        }

        :deep(.el-input__inner) {
          height: 41px;
          border: 2px solid #707070;
          opacity: 1;
          border-radius: 10px;
          font-size: 14px;
        }
        :deep(.el-button) {
          margin-top: 23px;
          margin-bottom: 56px;
          img {
            margin-right: 11px;
          }
        }
        .message {
          height: 133px;
          :deep(.el-textarea__inner) {
            height: 133px;
            border: 2px solid #707070;
            border-radius: 10px;
            font-size: 14px;
          }
        }
        .btn {
          display: flex;
          justify-content: center;
        }
      }
    }
  }
}
</style>
